package java111;

import java.util.Arrays;
import java.util.Scanner;

public class Day7 {
    // https://ac.nowcoder.com/acm/problem/219046
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] arr = new int[6];
        while (n-- > 0) {
            for (int i = 0; i < 6; i++) {
                arr[i] = in.nextInt();
            }
            Arrays.sort(arr);
            if (solution(arr)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
    }

    public static boolean solution(int[] arr) {
        if ((arr[2] < arr[0] + arr[1]) && (arr[5] < arr[3] + arr[4]) ||
                ((arr[3] < arr[0] + arr[2]) && (arr[5] < arr[1] + arr[4])) ||
                ((arr[4] < arr[0] + arr[3]) && (arr[5] < arr[1] + arr[2])) ||
                (arr[5] < arr[0] + arr[4]) && (arr[3] < arr[1] + arr[2])) {
            return true;
        }
        return false;
    }
}
